package com.ruoyi.system.mapper;

import com.ruoyi.system.domain.BiddingDemand;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface BiddingDemandMapper {
    int deleteByPrimaryKey(@Param("biddingDemandId") Long biddingDemandId, @Param("userId") Long userId);

    int insert(BiddingDemand record);

    int insertSelective(BiddingDemand record);

    BiddingDemand selectByPrimaryKey(@Param("biddingDemandId") Long biddingDemandId, @Param("userId") Long userId);

    int updateByPrimaryKeySelective(BiddingDemand record);

    int updateByPrimaryKey(BiddingDemand record);

    /**
     * @param biddingDemand 招标需求实体类
     * @return 返回查询到的分页结果
     * @Deprecated 查询用户所有招标需求
     */
    List<BiddingDemand> selectUserToBiddingDemand(BiddingDemand biddingDemand);

    /**
     * @param biddingDemandName 招标名称
     * @param userId            用户id
     * @return 返回查询到的数据
     * @Deprecated 根据名称和用户id查询是否存在相同的招标计划
     */
    BiddingDemand selectByPrimaryName(@Param("biddingDemandName") String biddingDemandName, @Param("userId") Long userId);

    /**
     * @Deprecated 删除投标人记录表
     * @param biddingDemandId 投标需求id
     */
    void deleteAllByDemandId(Long biddingDemandId);

    /**
     * @Deprecated 根据招标id查询信息
     * @param biddingDemand 招标实体类对象
     * @return 返回查询到的数据
     */
    BiddingDemand selectByDemandId(BiddingDemand biddingDemand);

    /**
     * @Deprecated 查询需求榜数据
     * @return 返回查询到的需求榜数据
     */
    List<BiddingDemand> queryBiddingDemandLeveDataList();
}